package com.sport.setting.service.impl;

import com.sport.apis.annotation.DIAccountUserBo;
import com.sport.model.common.dtos.ResponseResult;
import com.sport.model.common.enums.AppHttpCodeEnum;
import com.sport.model.setting.dtos.SportEventsAlmightyDto;
import com.sport.setting.repository.SportEventsAlmightyRepository;
import com.sport.setting.service.SportEventsAlmightyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;


@Service
public class SportEventsAlmightyServiceImpl implements SportEventsAlmightyService {

    private SportEventsAlmightyRepository sportEventsAlmightyRepository;

    public SportEventsAlmightyServiceImpl(@Autowired SportEventsAlmightyRepository sportEventsAlmightyRepository) {
        this.sportEventsAlmightyRepository = sportEventsAlmightyRepository;
    }

    @Override
    @DIAccountUserBo
    public ResponseResult defineAlmightyItem(SportEventsAlmightyDto sportEventsAlmightyDto) {
        if(sportEventsAlmightyDto == null)
            return ResponseResult.errorResult(AppHttpCodeEnum.PARAM_INVALID);

        return sportEventsAlmightyRepository.defineAlmightyItem(sportEventsAlmightyDto);

    }
}
